ERLC=erlc

FLAGS_ALL ?= -Werror +warn_export_all +warn_export_vars \
	+warn_shadow_vars +warn_obsolete_guard # +bin_opt_info +warn_missing_spec

FLAGS_DEBUG ?= +debug_info 

SOURCES=\
app.erl \
bounce.erl \
tools.erl \
fact.erl \
drop.erl \
echo_proc.erl \
counter_proc.erl \
cowboy_bench.erl \
cowboy_bench_2.erl \
cowboy_bench_sup.erl \
cowboy_bench_handler.erl \
cowboy_bench_handler_2.erl \

help:
	@echo "Build all modules in this primer"
	@echo $(SOURCES)

release: $(SOURCES) Makefile
	@echo "Compiling release ..."
	$(ERLC) $(FLAGS_ALL) $(SOURCES)

debug: $(SOURCES) Makefile
	@echo "Compiling Debug ..."
	$(ERLC) $(FLAGS_ALL) $(FLAGS_DEBUG) $(SOURCES)

clear:
	rm *.beam
